# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=opensmtpd-filter-rspamd
_pkgname=filter-rspamd
pkgver=0.1.8
pkgrel=6
pkgdesc="OpenSMTPD filter integration for Rspamd"
url="https://github.com/poolpOrg/filter-rspamd"
license="ISC"
# s390x: libressl
arch="all !s390x"
options="!check" # No test suite
depends="opensmtpd"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/poolpOrg/filter-rspamd/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

package() {
	install -Dm755 "$_pkgname" -t "$pkgdir"/usr/lib/opensmtpd/
	install -Dm655 "$_pkgname.8" -t "$pkgdir"/usr/share/man/man8/
}

sha512sums="
54dc5ec496251e6a223ac05909f4d940c79ce2487e40e30a430da24fcc211983c40355fd91a609e7bb109be49051ca81f092e297f5c8c1e5a3e91a188b948f04  opensmtpd-filter-rspamd-0.1.8.tar.gz
"
